
#include <pic.h>
#include "my_macros.h"
//#include "RF12B.h"
#include "SysClock.h"
#include "hardware.h"
#include "UART.h"
#include "string.h"
//#include "App.h"
#include "Outputs.h"


void Init_Device ( void )
{
	PORTA = 0;
	PORTB = 0;
	PORTC = 0;
	PORTE = 0;

	/* Comparators off */
	CM2CON0 = 0;
	CM2CON1 = 0;
	
	ANSEL = 0;						  /* all pins as digit */
	ANSELH = 0;						  /* all pins as digit */

	OSCCON = 0x70;					  /* 8Mhz */
	
	LED_DIR = OUTPUT;

	Out_Init();

	SysClock_Init();

	InitUART();
	
	PEIE = 1; 						  /* for UART receive */

	LED = 0;
	Out_Status = 0;
	GIE = TRUE;
}
